Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shell tool #29

Open
wants to merge 12 commits into
base: bom_master
Choose a base branch
from
Open

Add shell tool #29

wants to merge 12 commits into from

Conversation

hiker
Copy link
Owner

@hiker hiker commented Oct 23, 2024

Adds a shell tool as a convenience for other tools (e.g. lfric build scripts run nf-config, which can now use this).

#28 should be merged first, this branch is based on #28.

@hiker
Copy link
Owner Author

hiker commented Oct 24, 2024

I had to change the 'check if available' parameter (which was a single string, e.g. --version to take a list - across the various shells there was no way of testing them (e.g. dash and sh do not have any version output parameter). So in the end I run a simple echo command, and this required a change of the parameter from a simple string to a list of strings.

Additionally, I noticed that tool_repository.get_default_tool could return a tool that is not actually available on a machine, which with the new shell command becomes more important. So I've also updated this to return the first tool that is available (so e.g. on a machine without bash .... if that should exist ... it will now try to use sh, ksh, dash instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant